package com.ruicar.afs.cloud.risk.tortoise.dto.response.apply;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruicar.afs.cloud.risk.tortoise.anno.RefData;
import com.ruicar.afs.cloud.risk.tortoise.dto.response.GwtRefData;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/07/27 18:34
 */
@Data
@AllArgsConstructor
@Builder
@ApiModel("金融产品信息 - cafinancial")
public class GwtFinanceProduct extends GwtRefData implements Serializable {

    /**
     * Condition mark
     */
    //@RefData(dicKey = "isType", translatedKey = "whetherStatus", defaultVal = "no")
    @JsonInclude
    @JSONField(name = "excondition")
    @JsonProperty("excondition")
    private String conditionMark;

    /**
     * Loan amt
     */
    @JsonInclude
    @JSONField(name = "loanmoney")
    @JsonProperty("loanmoney")
    private BigDecimal loanAmt;

    /**
     * Discount amt
     */
    @JsonInclude
    @JSONField(name = "discountprice")
    @JsonProperty("discountprice")
    private BigDecimal discountAmt;

    /**
     * Discount scale
     */
    @JsonInclude
    @JSONField(name = "discount")
    @JsonProperty("discount")
    private BigDecimal discountScale;

    /**
     * Vendor discount amt
     */
    @JsonInclude
    @JSONField(name = "discountprice2")
    @JsonProperty("discountprice2")
    private BigDecimal vendorDiscountAmt;

    /**
     * Vendor discount scale
     */
    @JsonInclude
    @JSONField(name = "discount2")
    @JsonProperty("discount2")
    private BigDecimal vendorDiscountScale;

    /**
     * Customer rate
     */
    @JsonInclude
    @JSONField(name = "actualrate")
    @JsonProperty("actualrate")
    private BigDecimal customerRate;

    /**
     * Tail pay scale
     */
    @JsonInclude
    @JSONField(name = "tailratio")
    @JsonProperty("tailratio")
    private BigDecimal tailPayScale;

    /**
     * Rate
     */
    @JsonInclude
    @JSONField(name = "customerrate")
    @JsonProperty("customerrate")
    private BigDecimal rate;

    /**
     * Contract amt
     */
    @JsonInclude
    @JSONField(name = "allmoney")
    @JsonProperty("allmoney")
    private BigDecimal contractAmt;

    /**
     * Down pay amt
     */
    @JsonInclude
    @JSONField(name = "downamount")
    @JsonProperty("downamount")
    private BigDecimal downPayAmt;

    /**
     * Tail pay amt
     */
    @JsonInclude
    @JSONField(name = "tailamount")
    @JsonProperty("tailamount")
    private BigDecimal tailPayAmt;

    /**
     * Month repay
     */
    @JsonInclude
    @JSONField(name = "firstpayment")
    @JsonProperty("firstpayment")
    private BigDecimal monthRepay;

    /**
     * Interest amt
     */
    @JsonInclude
    @JSONField(name = "interest")
    @JsonProperty("interest")
    private BigDecimal interestAmt;

    /**
     * Product name
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "fnproduct")
    @JsonProperty("fnproduct")
    private String product;

    /**
     * Product name
     */
    @JsonIgnore
    @JSONField(serialize = false)
    private String productName;

    /**
     * Repay frequency
     */
    @JsonInclude
    @RefData(dicKey = "repaymentFrequency",translatedKey = "tortoiseRepayFrequency", defaultVal = "0")
    @JSONField(name = "paymentfrequency")
    @JsonProperty("paymentfrequency")
    private String repayFrequency;

    /**
     * Append producrt list
     */
    @JsonInclude
    @JSONField(name = "additioninfo")
    @JsonProperty("additioninfo")
    private List<GwtAppendProduct> appendProducrtList;


}
